<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>品牌列表</title>

<link rel="stylesheet" type="text/css" href="<?php echo asset_url('js/bootstrap/css/bootstrap.min.css');?>" />
<link rel="stylesheet" type="text/css" href="<?php echo asset_url('js/bootstrap/css/bootstrap-responsive.min.css');?>" />
<script type="text/javascript" src="<?php echo asset_url('js/jquery/jquery.js');?>"></script>

<link rel="stylesheet" type="text/css" href="<?php echo theme_url('css/common.css');?>" />
<script type="text/javascript" src="<?php echo theme_url('js/common.js');?>"></script>

<script type="text/javascript">
	$(document).ready(function(){

	});
</script>

</head>
<body>

	<?php echo widget('admin/header');?>

	<div id="wrap" class="container">
		
		<div class="btn-toolbar">
			<div class="btn-group">
				<a href="<?php echo admin_url('brand/insert');?>" class="btn">添加品牌</a>
			</div>
			<div class="btn-group">
				<button class="btn dropdown-toggle" data-toggle="dropdown">导出 <span class="caret"></span></button>
				<ul class="dropdown-menu">
					<li><a href="<?php echo admin_url('brand/export', array('type' => 'excel'));?>">EXCEL</a></li>
					<li><a href="<?php echo admin_url('brand/export', array('type' => 'txt'));?>">文本</a></li>
				</ul>
			</div>
		</div>

		<table class="table table-bordered">
			<tr>
				<th width="5%"><input type="checkbox" class="all" /></th>
				<th width="10%">ID</th>
				<th>名称</th>
				<th>网址</th>
				<th width="20%">图标</th>
				<th width="10%">操作</th>
			</tr>

			<?php foreach ($list as $row) {?>
			<tr>
				<td><input type="checkbox" value="<?php echo $row['id'];?>" /></td>
				<td><?php echo $row['id'];?></td>
				<td><a href="<?php echo admin_url('brand/update', array('id'=>$row['id']))?>" title="修改"><?php echo $row['name'];?></a></td>
				<td><?php echo $row['url'];?></td>
				<td><?php echo $row['logo'] ? ('<img src="'.$row['logo'].'" style="max-width: 100px;" />') : '';?></td>
				<td>
					<a href="<?php echo admin_url('brand/update', array('id'=>$row['id']))?>" class="icon-edit" title="修改"></a>
					<a href="<?php echo admin_url('brand/delete', array('id'=>$row['id']));?>" onclick="return false;" class="delete icon-remove" title="删除"></a>
				</td>
			</tr>
			<?php }?>

		</table>
		
		<div class="pager">
			共条<?php echo $page->rows();?>记录
			<?php echo $page->first();?>
			<?php echo $page->index();?>
			<?php echo $page->last();?>
		</div>
		
	</div>

	<?php echo widget('admin/footer');?>

</body>
</html>